package com.letoken.platform.repo.app.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.letoken.platform.repo.admin.dao.AdminRoleMenuMapper;
import com.letoken.platform.repo.admin.po.AdminRoleMenu;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wyl
 * @date 2023/4/21 15:18
 * @Version 1.0
 */
@Log4j2
@Repository
public class AdminRoleMenuManager {

    @Autowired
    private AdminRoleMenuMapper adminRoleMenuMapper;

    public void delByMenuId(List<Integer> menuId){
        LambdaQueryWrapper<AdminRoleMenu> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.in(AdminRoleMenu::getAdminMenuId,menuId);
        adminRoleMenuMapper.delete(queryWrapper);
    }
}
